#include "Figure.hpp"
#include "Visitor.hpp"
#include <iostream>

double intersect(Figure &a, Figure &b)
{
	IntersectVisitor visitor(b);
	a.accept(visitor);
	return visitor.val;
}

int main()
{
	Rectangle r;
	Circle c;
	std::cout << "intersect(Circle, Circle) = 1.0 ? " << intersect(c, c) << std::endl;
	std::cout << "interscet(Rectangle, Circle) = 2.0 ? " << intersect(r, c) << std::endl;
	std::cout << "interscet(Circle, Rectangle) = 2.0 ? " << intersect(c, r) << std::endl;
	std::cout << "intersect(Rectangle, Rectangle) = 3.0 ? " << intersect(r, r) << std::endl;
	return 1;
}
